class pickUpInfo
{
	public var itemType : int;
	public var itemIcon : Texture;
	public var itemAmount : int = 1;
	public var workTime : float;
	public var workScript : String;
}
public var info : pickUpInfo;
private var taken : boolean = false;

function OnTriggerEnter (other : Collider) : void
{
	if (taken)
		return;
	taken = true;
	
	var i : Inventory = other.GetComponent(Inventory);
	
	if (i!=null)
	{
		if (i.collect(info, this.gameObject))
			GameObject.Destroy(this.gameObject);
	}
}